﻿
namespace Tanmia.Basis.Security
{
    /// <summary>
    /// Service which perform authorization for the operation against the loged user.
    /// </summary>
    public interface IAuthorizationService
    {
        bool IsAuthorize(ApplicationUserInfo user, string operation);

        /// <summary>
        /// Authorize the specified operation against the user which has loged in before.
        /// </summary>
        /// <param name="operation">Operation name which is going to be authorized.</param>
        /// <returns></returns>
        bool IsAuthorize(string operation);

        /// <summary>
        /// Allow("Load").For("Riad").On("StoreModule").DefaultLevel()
        /// </summary>
        /// <param name="operation"></param>
        /// <param name="basedOn"></param>
        void Authorize(string operation);
    }
}
